package top.yxf.spring.test.bean.dao;

import java.util.HashMap;
import java.util.Map;

public class UserDao {
    private static Map<String, String> map = new HashMap<>();

    static {

    }
    public void initDataMethod(){
        System.out.println("执行：init-method");
        map.put("10001", "一乡风");
        map.put("10002", "小章");
        map.put("10003", "小吴");
    }

    public void destroyDataMethod(){
        System.out.println("执行：destroy-method");
        map.clear();
    }

    public String queryUserName(String userId) {
        return map.get(userId);
    }
}
